﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Transport
{
    public partial class QnA : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btn_Submit_Click(object sender, EventArgs e)
        {
            try
            {
                HoiDapControl ctrl = new HoiDapControl();
                hoi_dap hd = new hoi_dap();
                hd.loai_thac_mac = ddl_Type.SelectedValue;
                hd.ho_ten = txt_Name.Text;
                hd.email = txt_Email.Text;
                hd.noi_dung = txt_NoiDung.Text;
                ctrl.insert(hd);
                lbThongBao.Text = "Đã gửi.";
            }
            catch (Exception)
            {
                lbThongBao.Text = "Gửi thất bại. Xin bạn vui lòng gửi lại.";
            }
        }
    }
}